import QtQuick 2.15
import QtQuick.Controls 2.15

Rectangle
{
    id: listItem
    width: parent.width
    height: 50
    color: ListView.isCurrentItem?"#badbbb":"#ffffff"
    border.color: Qt.lighter(color, 1.1)

    Label {
        id: titleLabel
        color: "#0b0b0b"
        anchors.centerIn: parent
        anchors.top: parent.top
        anchors.bottom: parent.bottom

        font.family: awe_loader.name
        font.pixelSize: 30
        horizontalAlignment: Text.AlignHCenter
        verticalAlignment: Text.AlignVCenter
        text: title

    }

    Image {
        id: titleIconView
        anchors.right: titleLabel.left
        anchors.rightMargin: 5
        width: 30
        height: parent.height
        source: iconUrl
        fillMode: Image.PreserveAspectFit
    }

    MouseArea {
        anchors.fill: parent
        onClicked: {
            leftListview.currentIndex = index
            stackLayoutView.currentIndex = index
        }
    }

}
